package vip.xiaozhao.paotui.service;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import vip.xiaozhao.paotui.intf.entity.PayChannelAudit;
import vip.xiaozhao.paotui.intf.enums.PaySourceEnum;
import vip.xiaozhao.paotui.intf.mapper.PayChannelMapper;
import vip.xiaozhao.paotui.intf.service.PayChannelService;

import javax.annotation.Resource;

@Service
public class PayChannelServiceImpl implements PayChannelService {
    private static final Logger log =  LoggerFactory.getLogger(PayChannelServiceImpl.class);

    @Resource
    private PayChannelMapper payChannelMapper;


    @Override
    public PayChannelAudit loadById(int id) {
        return payChannelMapper.loadById(id);
    }

    @Override
    public int insert( PayChannelAudit payChannelAudit) {
        return payChannelMapper.insert(payChannelAudit);
    }

    @Override
    public PayChannelAudit loadByTradeNoAndSoure(String tradeNo, PaySourceEnum sourceEnum) {
        return payChannelMapper.loadByTradeNoAndSoure(tradeNo, sourceEnum.getId());
    }


}
